package com.fingard.dsp.bank.directbank.ybt12;

import com.fingard.dsp.bank.directConfig.TaskTimerSet;
import com.fingard.dsp.bank.directbank.bankInterface.IScheduleTask;
import com.fingard.dsp.bank.directbank.ybt12.YBT12Base;

public class YBT12ScheduleTask extends YBT12Base implements IScheduleTask {
	@Override
	public void execTask(TaskTimerSet timerSet) {
		try {
            if (timerSet.taskNameList.toLowerCase().contains("returnback")) {
            	returnBack();
            }
        } catch (Exception ex) {
            this.WriteBankLogLn(ex);
        }
		return;
	}
	
	 public void returnBack() {
		StringBuilder sbBuilder = new StringBuilder();
		boolean isUpdated = updateReturnStatus(sbBuilder);
		if (isUpdated) {
			WriteBankLogLn("批次数据更新成功.");
		} else {
			WriteBankLogLn("批次数据更新失败.");
		}
		return;
	 }
}
